package com.example.langchanin4jdemo1.controller;

import dev.langchain4j.data.image.Image;
import dev.langchain4j.model.image.ImageModel;
import dev.langchain4j.model.openai.OpenAiImageModel;
import dev.langchain4j.model.output.Response;

public class ImageModeTest {
    /**
     * 不好使
     * @param args
     */
    public static void main(String[] args) {
        ImageModel model = OpenAiImageModel.builder()
                .apiKey("sk-875dd6ef14244431acdc7ccb974f5bfe")
                .modelName("wanx-v1")
                .build();
        Response<Image> response = model.generate("生成一张萌猫的图片");
        System.out.println(response.content().url());
    }
}
